﻿/* ================================================================================
<copyright file="IXmlSerialize.cs" company="The Framework Factory, LLC" lastWriteTime="12/05/2012 23:23:47 PM">
  Copyright (c) 2012 The Framework Factory, LLC.  All rights reserved.
</copyright>
=================================================================================== */
using System.Xml;
using System.Xml.XPath;

namespace FWF.Logging.Xml
{
    /// <summary>
    /// Provides a basic xml serialization of a component.  Much like the .NET 
    /// Framework's <see cref="System.Xml.Serialization.IXmlSerializable">IXmlSerializable</see>, but 
    /// using the <see cref="System.Xml.XPath.XPathNavigator">XPathNavigator</see> component 
    /// for deserializing components which provides much more flexibility.
    /// </summary>
    public interface IXmlSerialize
    {
        /// <summary>
        /// Writes the current instance as Xml
        /// </summary>
        /// <param name="writer">The writer.</param>
        void ToXml( XmlWriter writer );

        /// <summary>
        /// Populates the current instance from Xml
        /// </summary>
        /// <param name="xDoc">The x doc.</param>
        void FromXml( XPathNavigator xDoc );
    }
}
